package com.haha.project0301.service.impl;

import com.haha.project0301.dao.EmpDao;
import com.haha.project0301.pojo.Employee;
import com.haha.project0301.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collection;

/**
 * @author dsx
 * @date 2021/3/1 17:04
 * @since JDK1.8
 */
@Service
public class EmpServiceImpl implements EmpService {
    @Autowired
    EmpDao empDao;
    
    @Override
    public Collection<Employee> getAllEmp() {
        return empDao.getAllEmp();
    }

    @Override
    public Employee getEmpById(Integer id) {
        return empDao.getEmpById(id);
    }

    @Override
    public void addEmp(Employee emp) {
        empDao.addEmp(emp);
    }

    @Override
    public void deleteEmployeeByID(int id) {

        empDao.deleteEmployeeByID(id);
    }
}
